# 商业转载请联系作者获得授权，非商业转载请注明出处。
# For commercial use, please contact the author for authorization. For non-commercial use, please indicate the source.
# 协议(License)：署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
# 作者(Author)：
# 链接(URL)：http://www.ryuichi.tech/88.html#E_-_Colorful_Blocks
# 来源(Source)：

#include<bits/stdc++.h>
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define debug  freopen("in.txt","r",stdin),freopen("out.txt","w",stdout);
#define win first
#define lose second
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int maxn = 1e6+10;
using namespace std;
 
int N;
pii a[maxn],b[maxn];int tailA,tailB;
 
void init(string &s){
    int w = 0,l = 0;
    for(auto c:s){
        if(c == '(') w++;
        else if(w) w--;
        else l++;
    }
    if(w >= l) a[++tailA] = {w,l};
    else b[++tailB] = {w,l};
}
 
bool cmp1(pii &a,pii &b) {
    return a.lose < b.lose;
}
bool cmp2(pii &a,pii &b){
    return a.win > b.win;   
}
 
int solve(){
    sort(a+1,a+tailA+1,cmp1);
    sort(b+1,b+tailB+1,cmp2);
    int cur = 0;
    for(int i = 1;i<=tailA;i++){
        cur -= a[i].lose;
        if(cur < 0) return cout<<"No\n",0;
        cur += a[i].win;
    }
    for(int i = 1;i<=tailB;i++){
        cur -= b[i].lose;
        if(cur < 0) return cout<<"No\n",0;
        cur += b[i].win;
    }
    if(cur !=0) return cout<<"No\n",0;
    return cout<<"Yes\n",0;
}
int main(){
    // debug;
    ios;
    cin>>N;
    for(int i = 1;i<=N;i++){
        string s;cin>>s;
        init(s);
    }
    solve();
 
    return 0;
}
